<?php
/**
 * Created by PhpStorm.
 * User: Lin
 * Date: 2017/4/7 0007
 * Time: 下午 20:26
 */
Class PageObj{
    private $page;
    private $limit;
    private $show;
    function getPage($map,$where,$pageSize=10){
        import('ORG.Util.Page');
        $count=M($map)->where($where)->count();
        $this->page=new Page($count,$pageSize);
        $this->show=$this->page->show();
        $this->limit=$this->page->firstRow.','.$this->page->listRows;
        return array(
            'limit'=>$this->limit,
            'show'=>$this->show,
        );
    }
}